//
//  YKCountryPlace.m
//  yuke
//
//  Created by Dejun Liu on 15/1/9.
//  Copyright (c) 2015年 juwan. All rights reserved.
//

#import "YKCountryPlace.h"
#import "YKPlace.h"

@implementation YKCountryPlace

+ (NSArray *)listFromArrayDic:(NSArray *)arr
{
    NSMutableArray *res = [NSMutableArray array];
    if (![arr isKindOfClass:[NSNull class]]) {
        [arr enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
            YKCountryPlace *p = [[YKCountryPlace alloc] init];
            p.country = [obj objectForKey:@"country"];
            p.items = [YKPlace listFromArrayDic:[obj objectForKey:@"items"]];
            [res addObject:p];
        }];
    }
    return res;
}

@end
